Skip to content

WIP: classic nimble handling of nodes as chars#21

Open
paciorek wants to merge 3 commits into
masterfrom
nodes-to-chars
Open

WIP: classic nimble handling of nodes as chars#21
paciorek wants to merge 3 commits into
masterfrom
nodes-to-chars

Conversation

@paciorek

Copy link
Copy Markdown
Contributor

This leverages existing machinery in nodeRanges and varRanges to return character vectors of nodes from getNodes, getParents, getDependencies.

To do:

  • convert my informal examples to tests
  • add getNodeNames and expandNodeNames for backwards compatibility

paciorek added 3 commits June 11, 2026 07:57
getNodes, getParents, getDeps.
convert to nodeChars, then get sortID by converting to calcRanges,
then converting to scalar components via varRange, if needed.
@paciorek

Copy link
Copy Markdown
Contributor Author

I've added getNodeNames and expandNodeNames. For both of these, when we want sorted results (which is always the case for getNodeNames based on current nimble), we need to handle as follows. Since the notion of ordering is not part of nodeRanges, we need to first convert to node chars, one per node, then get the associated calcRange for each to use to sort those node chars. Then if scalar components are requested, convert to varRanges in order to then get the components.

There may be corner cases that make backwards compatibility hard, but not fully sure yet. Also, I still need to consider issue #20 to work through the extent to which nimbleModel may give results in a different order than nimble, in particular in the case of ties and how much we can alleviate that.

I still need to add formal tests (a sketch of some test cases is in test-backwards.R).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant